/*
* Copyright (C) 2009-2013 - Roman Kalynchuk
*
* This file is part of REngine.
*
* REngine is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* REngine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with REngine.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef __CWINDOWSDL_H__
#define __CWINDOWSDL_H__

#include "gui/iwindow.h"
#include "SDL/SDL.h"

namespace rengine3d {

	class CWindowSDL: public IWindow {
	public:
		CWindowSDL();
		virtual ~CWindowSDL();

		virtual bool Init(const string_t& title, uint width, uint height, uint bpp, bool fullScreen);
		virtual void Shutdown(void);

		virtual bool Update(void);
		virtual void SwapBuffers(void);

		virtual void SetCursorPos(uint x, uint y);
		virtual void ShowCursor(void);
		virtual void HideCursor(void);

		virtual bool GetFocus(void);
		virtual void SetFocus(bool focus);

		virtual bool IsActive(void);
		virtual void SetActive(bool active);

		virtual bool IsFullScreen(void){ return m_fullScreen; };
		virtual void SetFullScreen(bool fs);

		virtual int GetXPosition(void);
		virtual int GetYPosition(void);

		virtual uint GetWidth(void) { return m_width;};
		virtual uint GetHeight(void){ return m_height;};

		virtual void SetTitle(const string_t& title);
	private:
		bool		m_fullScreen;
		string_t	m_title;
		uint			m_width;
		uint			m_height;
		uint			m_bpp;
		SDL_Surface*	m_screen;
	};
}
#endif
